%{
#include <string.h>
#include <stdlib.h>

#include "ctnode.h"
#include "grammar.tab.h"
%}

%option noyywrap

WHITESPACE [\n\t ]*

%%

{WHITESPACE}    {}

","                   { return COMMAOP; }
"|"                   { return PIPEOP; }
":"                   { return COLONOP; }
"|:"                  { return PIPECOLONOP; }
":|"                  { return COLONPIPEOP; }
"||"                  { return PIPEPIPEOP; }
":||"                 { return COLONPIPEPIPEOP; }
":|:"                 { return COLONPIPECOLONOP; }
"{"                   { return OBRACEOP; }
"}"                   { return CBRACEOP; }
"["                   { return OBRACKETOP; }
"]"                   { return CBRACKETOP; }
[Bb][Pp][Mm]          { return BPMKW; }
[Bb][Ee][Aa][Tt][Ss]  { return BEATSKW; }
[Aa][Vv][Oo][Ll]      { return AVOLKW; }
[Qq][Vv][Oo][Ll]      { return QVOLKW; }
[Ee][Vv][Oo][Ll]      { return EVOLKW; }
[Ss][Vv][Oo][Ll]      { return SVOLKW; }
[Tt][Vv][Oo][Ll]      { return TVOLKW; }
[Aa][Cc][Cc][Ee][Ll]  { return ACCELKW; }
[Dd][Ee][Cc][Ee][Ll]  { return DECELKW; }
[0-9]+                {
                        yylval.intval = atoi (yytext);
                        return NUMBER;
                      }
#.*$                  { }

%%
